#!/bin/sh

GOPATH=/data/www/go_proj
baseDir=$GOPATH/src/lottery
host=s2.tike.bid

env GOOS=linux GOARCH=amd64 go build -o lottery $baseDir/main.go
rsync -vlcr $GOPATH/src/lottery  root@$host:/data/www/go_proj/src/ --exclude-from "$baseDir/sh/exclude.list" --progress
ssh root@$host "supervisorctl restart lottery"